<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>
	<body>
		<script>
			function getSum() {
				/*
          类数组对象,对象中的key为数字下标,并且有length属性对象
          0: 1
          1: 2
          2: 3
          3: 54
          callee: ƒ getSum()
          length: 4
        */
				console.log('typeof arguments :>> ', typeof arguments, arguments)

				var total = 0
				for (var i = 0; i < arguments.length; i++) {
					total += arguments[i]
				}
				return total
			}

			const total = getSum(1, 2, 3, 54)
			console.log('total :>> ', total)
		</script>
	</body>
</html>
